//
//  JJTempViewController.swift
//  JJSina
//
//  Created by mac on 2017/12/4.
//  Copyright © 2017年 xinyuan. All rights reserved.
//

import UIKit

class JJTempViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        setupUI()
        
    }
    

    private func setupUI() {
        view.backgroundColor = RGB(r: 106, g: 186, b: 243)
//        view.backgroundColor = JJRandomColor()
        setupNav()
        
    }
    private func setupNav() {
        // 设置title
        title = "第\(navigationController?.childViewControllers.count ?? 0)个控制器"
        // 设置右侧按钮
        navigationItem.rightBarButtonItem = UIBarButtonItem(imageName: nil, title: "PUSH", target: self, action: #selector(rightClick))
    }
    
    @objc private func rightClick() {
        let tempVc = JJTempViewController()
    navigationController?.pushViewController(tempVc, animated: true)
    }
    
}
